home *** CD-ROM | disk | FTP | other *** search
- Path: lep-philips.fr!news
- From: cabanie@lep-philips.fr (Jean-Pierre CabaniƩ)
- Newsgroups: comp.lang.rexx
- Subject: Re: Calling variable procs
- Date: 10 Jan 1996 06:40:09 GMT
- Organization: Philips Microwave Limeil
- Distribution: inet
- Message-ID: <4cvn0a$c1p@procyon.lep-philips.fr>
- NNTP-Posting-Host: autan.lep-philips.fr
-
- In message <4cqv96$4ce@wumpus.cc.uow.edu.au> - rap38@wumpus.cc.uow.edu.au (Perr
- y Andre R) writes:
- :>
- :>Is there anyway to call a proceedure that is stored
- :>in a variable.
- :>
- :>eg.
- :>
- :>foobar='testproc'
- :>
- :>call foobar
- :>exit
- :>
- :>testproc:
- :> say 'Rexx is limited'
- :>return
- :>
- :>
- :>I don't want to run other scripts. Would it be possible
- :>to make a library to implement this?
- :>
- :>eg.
- :>call VarCall foobar /* would call whet the variable "points to" */
- :>
- :>Any suggestions would be very much appreciated.
- :>
- :>Andre.
- :>
-
- What about
- Proc.1 = 'Proc_1'
- Proc.2 = 'Proc_2'
- Do i = 1 to 2
- Interpret 'Call' Proc.i
- End
- Exit
-
- Proc_1:
- Say 'RexX Seems limited' ...
- Return
-
- Proc_2:
- Say 'only by your imagination'
- Return
-
- Obviously, the above code is quite tricky to compile ...
-
- Hope this helps
-
- Jean-Pierre Cabani/e
-
-